#include "entity.h"
#include "scene_manager.h"

CEntity::CEntity() : entity_link_(this)
{
	instance_id_ = 0;
	angle_ = 0;
	cur_speed_ = 0.0f;
	client_key_ = 0;
	m_view_range = 0;
	m_sqr_view_range = 0;

	// access_variable 
	m_speed = 0;
	m_type_id = 0;
	m_orientation_x = 0;
	m_orientation_y = 0;
	m_orientation_z = 0;
}

CEntity::~CEntity()
{
}

int32_t CEntity::GetSceneId()
{
	CSceneInstance* instance = CSceneManager::GetInstance().GetSceneInstance(instance_id());
	if (instance == NULL)
	{
		return 20000;
	}
	return instance->tpl_id();
}
